#!/bin/sh

BASEPATH=$(cd `dirname $0`; pwd)
INSTALL_PREFIX=/opt/dev

rm -rf $BASEPATH/libpcap-1.9.1
tar -zxf libpcap-1.9.1.tar.gz

rm -rf $BASEPATH/tcpdump-4.9.3
tar -zxf tcpdump-4.9.3.tar.gz

cd $BASEPATH/libpcap-1.9.1
./configure --host=arm-hisiv400-linux --prefix=/opt/dev --with-pcap=linux
make
#make install

cd $BASEPATH/tcpdump-4.9.3
./configure --host=arm-hisiv400-linux --prefix=/opt/dev
make
#make install


mkdir -p $BASEPATH/dist/hisiv400
cp $BASEPATH/tcpdump-4.9.3/tcpdump $BASEPATH/dist/hisiv400/
